package springbootmybatis.demo.service.system.user.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import springbootmybatis.demo.dao.common.DaoSupport;
import springbootmybatis.demo.entity.MybatisUser;
import springbootmybatis.demo.service.system.user.MybatisUserService;

@Service
public class MybatisUserServiceImpl implements MybatisUserService{
	
	@Resource(name="daoSupport")
	DaoSupport dao;
	
	@Override
	public Integer save() {
		MybatisUser user = new MybatisUser();
		user.setName("测试2");
		user.setPassword("12312");
		try {
			return dao.save("MybatisUserMapper.save", user);
		} catch (Exception e) {
			return -1;
		}
	}
	
}
